package com.design.建造者模式;

public class IPhoneX implements IBuildPhone{

	private MobilePhone mobilePhone;
	
	public IPhoneX() {
		this.mobilePhone = new MobilePhone();
	}
	
	@Override
	public void buildScreen() {
		mobilePhone.setScreen("LED显示屏");
	}

	@Override
	public void buildBattery() {
		mobilePhone.setBattery("530000毫安电池");
	}

	@Override
	public void BuildMicrophone() {
		mobilePhone.setMicrophone("听筒");
	}
	
	public MobilePhone buildAuto() {
		buildScreen();
		buildBattery();
		BuildMicrophone();
		return mobilePhone;
	}
	
	public MobilePhone build() {
		return mobilePhone;
	}

}
